import java.util.ArrayList;




public class Speed 
{
	private double lastX;
	private double lastY;
	
	private double vX;
	private double vY;
	
	boolean onFloor = false; 
	
	private float speedDecayFactor = .9f;
	
	public Speed(int currentX, int currentY)
	{
		lastX = currentX;
		lastY = currentY;
	}
	
	
	public void gravity()
	{
		if (vY > 10)
		{
			vY = vY - .5;
		} else
		{
			vY = vY + .5;
		}
	}
	
	public void waterGravity()
	{
		if (vY < 2.5)
		{
			vY = vY + .25;
		} else
		{
			vY = vY - .25;
		}
	}
	
	public double getvX()
	{
		return vX;
	}
	
	public double getvY()
	{
		if (onFloor)
		{
			return 0;
		}
		return vY;
	}
	public void setvX(double d)
	{
		this.vX = d;
	}
	
	public void setvY(double vY)
	{
		this.vY = vY;
	}

	
	public void reverseX()
	{
		vX = vX * -1;
	}
	
	public void reverseY()
	{
		vY = vY * -1;		
	}

}
